package com.sugar.queryinfo.module.business.controller.admin.data.dataquerylsbg.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;

import static com.sugar.queryinfo.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 数据查询-流水报告 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DataQueryLsbgRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23029")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23003")
    @ExcelProperty("用户ID")
    private Long userId;

    @Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26713")
    @ExcelProperty("部门ID")
    private Long deptId;

    @Schema(description = "数据ID", example = "27376")
    @ExcelProperty("数据ID")
    private Long dataId;

    /**
     * 查询姓名
     */
    private String queryName;
    /**
     * 查询证件号
     */
    private String queryIdCard;
    @Schema(description = "查询时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("查询时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime queryTime;

    @Schema(description = "流水报告地址", example = "https://www.iocoder.cn")
    @ExcelProperty("流水报告地址")
    private String url;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
